package com.hobart.learning.lagou.edu.IPersistence.sqlSession;

import com.hobart.learning.lagou.edu.IPersistence.pojo.Configuration;

/**
 * @author ：hobart
 * @date ：Created in 2020-11-11 0:02
 * @description：工厂类
 * @modified By：
 * @version: 1$
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
